﻿@namespace MudBlazor
@using MudBlazor.Utilities
@inherits MudComponentBase



@if (LinkToIndex)
{
    <a @attributes="UserAttributes" class="@Classname" style="@Style" href="/">
        @ChildContent
    </a>
}
else
{
    <div @attributes="UserAttributes" class="@Classname" style="@Style">
        @ChildContent
    </div>
}


@code {

    protected string Classname =>
    new CssBuilder("mud-drawer-header")
       .AddClass($"mud-drawer-header-dense", Dense)
      .AddClass(Class)
    .Build();

    /// <summary>
    /// If true, compact padding will be used, same as the Appbar.
    /// </summary>
    [Parameter] public bool Dense { get; set; }

    /// <summary>
    /// Child content of component.
    /// </summary>
    [Parameter] public RenderFragment ChildContent { get; set; }

    /// <summary>
    /// If true, the component will link to index page with an a element instead of div.
    /// </summary>
    [Parameter] public bool LinkToIndex { get; set; }

}